<template>
  <div class="info-pos">
    <form>
      <div class="form-group">
        <label for="formGroupExampleInput">手机号码</label>
        <div type="text" class="form-control" id="formGroupExampleInput" >{{Customer.customerPhoneNumber}}</div>
      </div>
      <div class="form-group">
        <label for="formGroupExampleInput2">账号</label>
        <div type="text" class="form-control" id="formGroupExampleInput" >{{Customer.customerUsername}}</div>
      </div>
      <div class="form-group">
        <label for="formGroupExampleInput2">账号等级</label>
        <div type="text" class="form-control" id="formGroupExampleInput" >{{Customer.member}}</div>
      </div>
    </form>

  </div>
</template>

<script>
export default {
  name: 'CustomerInfo',

  data() {
    return {
      Customer: {
        customerPhoneNumber: "",
        customerUsername: "",
        member: "",
      },
    }
  },

  methods: {
    async getInfo() {
      const {data: res} = await this.$http.get('/customer/info?phoneNumber='+localStorage.getItem("username_C"))
      this.Customer.customerPhoneNumber=res.data.customerPhoneNumber
      this.Customer.customerUsername=res.data.customerUsername
      this.Customer.member=res.data.member

    },
  },


  created() {
    this.getInfo()
  }

}
</script>

<style lang="less" scoped>
.info-pos{
  margin: 0 auto;
  width: 600px;
  height: 400px;
  border: 50px solid white;

}

</style>
